home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr46 / prexcm20.zip / PROTECT.DOC < prev    next >
Text File  |  1993-05-30  |  20KB  |  402 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                        Protect! EXE/COM version 2.0
  7.                 (C) 1993 Jeremy Lilley, All Rights Reserved
  8.                                May 31, 1993
  9.  
  10.  
  11.  
  12. NOTE: PLEASE READ THIS DOCUMENTATION WELL BEFORE ATTEMPTING TO USE THIS
  13. PROGRAM -- YOU MAY ACCIDENTALLY BUT IRREVERSIBLY DAMAGE FILES!!!
  14.  
  15.  
  16.  
  17. Contents:
  18.         Introduction
  19.         Requirements
  20.         How to use Protect! EXE/COM
  21.         Which Files can't be Protected
  22.         Legal Terms / Disclaimer
  23.         License
  24.         How Does Protect! EXE/COM Stand up to Other Utilities
  25.         Notes About COM Protecting
  26.         Notes about EXE protecting
  27.         Finally, Protect! EXE/COM's Cost
  28.  
  29.  
  30.  
  31.  
  32. Introduction:
  33.  
  34.  
  35.  
  36.      Finally, you can truly protect your EXE and COM files from
  37. modification and still leave them executable! If you are a programmer, this
  38. program can be one of your most important tools -- you can save time and
  39. energy by simply using this program to scramble your EXE or COM programs
  40. instead of working on complicated copy-protection schemes of your own.
  41. Shareware authors in particular can provide a peace of mind to their
  42. potential registrants by protecting their programs from possible hacking
  43. that may occur before the potential customers obtain the product. Others
  44. can use this program for additional security in a virus-prone environment
  45. or to protect their software investment. Protect! EXE/COM is extremely
  46. effective in the level of security that it provides -- a CRC (Cyclic
  47. Redundancy Check, complex check for file integrity) is calculated whenever
  48. the protected program is loaded, and no program with a bad CRC will be
  49. allowed to run at all. Compare that to the fact that NO OTHER PROGRAM ON
  50. THE MARKET SUPPORTS CRC CALCULATIONS EVERY TIME a protected program is
  51. loaded -- not even PKLite (R) commercial (which still happens to cost
  52. almost $150). You will find that Protect! EXE/COM is the best product for
  53. the security of your EXE and COM files as well as the best value for your
  54. file security dollar.
  55.  
  56.      If you have tried previous versions of Protect! EXE/COM before, 
  57. this version is unlike any of the other versions because it has many, 
  58.  
  59.  
  60.  
  61.  
  62. many times more security than previous versions did (see WHATSNEW.DOC).
  63.  
  64.      Let's go down memory lane briefly and explore some of the more
  65. primitive methods used to secure EXE and COM files. In the beginning of
  66. computing, programmers simply hoped that nobody was smart enough to modify
  67. their files. This method worked until the advent of malicious, clever
  68. hackers with sophisticated hex editors. Programmers then started resorting
  69. to some security methods like copy protection and "tying" a file to the
  70. disk; however, they were extremely obtrusive and slow -- they did not work.
  71. LZEXE and then PKLite came out and programmers thought that by simply
  72. compressing the files with utilities like these, they were home-free. When
  73. UnLZEXE came out and along with PKLite and its decompress option,
  74. programmers were again starting to have problems with protecting their EXE
  75. and COM files. To trick these decompressors, programmers would simply use
  76. their favorite hex editors to change the signature that UnLZEXE or PKLite
  77. would look for on a file and hoped that nobody would change the signature
  78. back to the original and decompress the file. PKWare added a -E option on
  79. the $150 commercial version of PKLite to prevent decompression, but that
  80. has not really worked because hackers have created programs to expand the
  81. "unexpandable" PKLite -E files and made them widely available -- one BBS
  82. local to me has a couple of such programs. Now what for programmers who
  83. wish to preserve the integrity of their programs ? I created Protect!
  84. EXE/COM to solve this problem. 
  85.  
  86.  
  87.  
  88.  
  89. Requirements:
  90.  
  91.  
  92.  
  93.      The requirements are basically nil: DOS 2.0, IBM PC, 256k, etc... I
  94. can run this program on my 4.77 mhz XT and have it run quickly. The one
  95. major software requirement for protecting EXE files is that you are
  96. REQUIRED TO OWN AN EXECUTABLE COMPRESSION PROGRAM such as LZEXE (FREE!),
  97. PKLite, or Compack. The reasons are simple -- scrambled data seems more
  98. scrambled if it is compressed first. If you have huge sequences of the same
  99. character (particularly ASCII #0), the encoding sequence can be revealed
  100. much more easily than if you simply have the tokens and marker characters
  101. that a compression program would leave instead. Relocatable items are also
  102. resolved by the compression program, allowing Protect! EXE/COM to calculate
  103. a CRC reliably. Of course, the file also takes up less space when
  104. compressed with an executable compressor, and it will give a hacker more
  105. problems than those that Protect! EXE/COM gives alone. Protect! EXE/COM
  106. also can insure that the programs that it protects will run consistently if
  107. they originate in the more consistent form that LZEXE or PKLite provides
  108. them in. Besides, LZEXE is a free program thanks to the generosity of
  109. Fabrice Bellard, and if you need a good yet free EXE compression utility,
  110. you should obtain that program (because it only takes a few minutes to get
  111. by modem or a few dollars for it on a disk, and it has been translated into
  112. English, you really should have no excuse for not having it). Most
  113. importantly, Protect! EXE/COM will almost surely protect any file that has
  114. been compressed with LZEXE or PKLite because the requirements are very
  115. similar: overlays, Windows files, and OS/2 files that cannot be compressed
  116. with LZEXE and PKLite cannot be protected by Protect! EXE/COM either, so if
  117. a file can be compressed, it can probably be protected.
  118.  
  119.  
  120. How to use Protect! EXE/COM:
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.      To use Protect! EXE/COM, simply run ProtExCm.EXE with the program to
  128. protect and the password as parameters. The password can now contain spaces,
  129. underscores are not required. Here is an example:
  130.  
  131.      ProtExCm PROGRAM.EXE This is My Password
  132.  
  133. PROGRAM.EXE is protected with "This is My Password" as the password. The
  134. original PROGRAM.EXE is renamed to PROGRAM.OLD. The symbol @ can be used to
  135. say that the password is in a file:
  136.  
  137.      ProtExCm MYPROG.COM @MYPASSWD.FIL
  138.  
  139. MYPROG.COM is encrypted with the contents of MYPASSWD.FIL as the password.
  140. Only the first 255 bytes of the file will be used for the password, and if
  141. the file is less than 255 bytes, only that will be used as the password.
  142. Please note that the same password will probably not yield the same
  143. encoding sequence because of the way that the password is generated (the
  144. time of day and the date is used along with the password to insure greater
  145. randomness). Once again, the original MYPROG.COM is renamed MYPROG.OLD.
  146.      Please note that no file can be expanded after being protected with
  147. Protect! EXE/COM, so please preserve the original file until you are sure
  148. that the protected file runs correctly (some incompatibilities may arise
  149. with certain files). That is about all that you need to know before you can
  150. really start protecting your programs with Protect! EXE/COM. EXE files must
  151. be compressed with LZEXE, PKLite, or Compack and then protected but COM
  152. files can be directly protected. A file called Protect.BAT is included, and
  153. using it can be much easier than doing the steps separately:
  154.  
  155.      Protect.BAT :
  156.           if %2=="COM" goto comfile
  157.           lzexe %1.EXE                     (you can use PKLite here also)
  158.           ren %1.OLD %1.BAK
  159.           ProtExCm %1.EXE This_isn't_my_Password
  160.           del %1.old
  161.           ren %1.bak %1.old
  162.           goto End
  163.           :comfile
  164.           REM you can use PKLite to compress COM files if you want
  165.           ProtExCm %1.Com This_isn't_my_Password
  166.           :End
  167.           
  168.      To call this batch file, simply type "Protect PROGRAM COM" to protect
  169. PROGRAM.COM or "Protect PROGRAM EXE" to protect PROGRAM.EXE. 
  170.  
  171.  
  172.  
  173.  
  174. Which Files can't be Protected:
  175.  
  176.  
  177.  
  178.      MS Windows, OS/2, and overlay files cannot be protected with Protect!
  179. EXE/COM. Basically, anything that can be compressed with LZEXE or PKLite
  180. can be protected. Some programs, however, do not like being protected. Some
  181. commercial programs have it in their licenses that they cannot be
  182.  
  183.  
  184.  
  185.  
  186. protected, and other programs simply have types of copy-protection which
  187. inhibit their protection with this program. DO NOT PROTECT COMMAND.COM,
  188. IBMBIO.COM, IBMDOS.COM (IBMBIO.COM and IBMDOS.COM correspond to IO.SYS and
  189. MSDOS.SYS in MS-DOS), or any other system-type file. You will most likely
  190. have to reboot the computer from a system disk if you try that. Other
  191. programs also have their own loaders like COMMAND.COM does -- don't protect
  192. these either.
  193.  
  194.  
  195.  
  196.  
  197. Legal Terms / Disclaimer:
  198.  
  199.  
  200.      Protect! EXE/COM ("program") will alter executable files and may
  201. render them useless (that is why .OLD files are created, in case of
  202. incompatibility arises with a particular file) in certain circumstances.
  203. Under no circumstances may Jeremy Lilley ("author") be held liable or
  204. accountable for any damage to system files, executable files, data files,
  205. or any other system damage. The author also may not be held accountable for
  206. loss of profits or for any other damages incurred by the use or misuse of
  207. the program. The author has forewarned any users that permanent damage to
  208. files may occur with misuse of his program and in executing the program,
  209. any user understands this risk. This also seems the place to say that
  210. PKLite is a registered trademark of PKWare Corp., MS Windows is a
  211. registered trademark of Microsoft Corp., and OS/2 is a registered trademark
  212. of IBM corp.
  213.      Don't worry -- there is little risk of damage resulting from this
  214. program's use as long as you use it correctly. However, if you try to make
  215. it mess up, it probably will. Just don't try protecting IBMBIOS.COM and
  216. then wondering why your system won't boot up correctly.
  217.  
  218.  
  219.  
  220.  
  221.  
  222. License:
  223.  
  224.  
  225.  
  226.      You may use Protect! EXE/COM for the purposes of evaluating it (after
  227. understanding the disclaimer and the documentation) for 30 days. No files
  228. protected by Protect! EXE/COM during this trial period may be distributed
  229. to other computers at all, commercially or non-commercially. If you find
  230. Protect! EXE/COM to be of use to you, you must register Protect! EXE/COM
  231. with the author. Government, educational, and commercial institutions
  232. absolutely must register this program with the author (please contact him
  233. for quantity discounts). Sysops, user groups, disk vendors, and other
  234. similar organizations may distribute Protect! EXE/COM provided that no
  235. files are excluded from the distribution and that no more that $8 is
  236. charged for distribution.
  237.  
  238.  
  239.  
  240.  
  241. How Does Protect! EXE/COM Stand up to Other Utilities?
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.      Protect! EXE/COM's first concern is security -- especially with EXE
  249. files. While NO OTHER utility allows a CRC to be taken EACH time your
  250. program is run, Protect! EXE/COM does so each and every time. Though
  251. loading may be slowed a half of a second on average, Protect! EXE/COM is
  252. still much faster than fooling around with copy protection-type schemes
  253. because Protect! EXE/COM's loader loads completely in memory using highly-
  254. optimized routines. Try PKLiting an EXE file and change a byte or two in
  255. the middle of the file (find parts of text that you can still recognize
  256. slightly). As long as the program doesn't crash, PKLite doesn't notice your
  257. changes at all. A hacker can also decompress a program compressed with
  258. PKLite or LZEXE quite easily -- even if a program is compressed with the   
  259. -E option (supposedly "invincible") on the commercial version of PKLite.
  260. After decompressing, any hacker can "fix" your program (remove copyright
  261. screens, add "trojan horse" routines, etc...), compress it up again, and
  262. spread it around, possibly damaging your profits, your reputation, and
  263. others' computers. (I hope you have a good disclaimer...) Fortunately,
  264. hacking is not totally rampant like that, but it still is a possibility and
  265. a risk, and it is much better to pay a few dollars to be safe than to be
  266. sorry. I don't want to have "hacks" of my programs floating around or to
  267. have to worry about that, and neither should you. Though no software-only
  268. protection program like this is 100% fool-proof, I am pretty sure this
  269. program is the best for protecting your EXE and COM files. Most "trojan
  270. horses" and "hacks" can't be detected by ordinary virus scanners, and it is
  271. up to you to defend the security and well-being of your programs.
  272.  
  273.  
  274.  
  275.  
  276.  
  277. Notes About COM Protecting:
  278.  
  279.  
  280.      One of the main disadvantages with this program is its decrease in
  281. loading speed. However, since a COM file is always less than 64k (65536
  282. bytes), any decrease in loading speed is not much of a factor. The COM file
  283. protector is much less sophisticated than the EXE file protector. The COM
  284. protector calculates a simple CRC and does a little encrypting, but not to
  285. the extent that the EXE protector does. You can use Protect! EXE/COM on any
  286. COM file that you want to add a moderate level of protection to. The COM
  287. protector will discourage most people from touching the file and give
  288. anyone who wants to get through it a great deal of grief. The COM protector
  289. adds fewer than 200 bytes to a file yet adds a great deal of protection. It
  290. is not the most sophisticated protector possible, but it calculates a CRC
  291. and works quickly. There is little slowing in loading, but to calculate it
  292. exactly, I created the largest possible COM file (just less than 64k) and
  293. loaded it on my 4.77 mhz XT (its first instruction was to terminate and the
  294. other 63k or so was garbage). Unprotected, it took 1.9 seconds, and
  295. protected, it took 2.5 seconds. The difference in the speed is negligible
  296. on an XT, and it is even more negligible on a 386 or 486. Besides, if you
  297. care enough about that 0.6 of a second on a 4.77mhz XT, you will probably
  298. have a 486 fast enough that you will not be able to blink faster than the
  299. program's loading. Please note that neither the COM protector nor the EXE
  300. protector can really guard too much against viruses; if the virus is tacked
  301. on a file after it is protected and it does not modify the program's actual
  302. image, there will be no warning. If you want to test Protect! EXE/COM's
  303. protection against hacking, simply protect a file, use your favorite hex
  304. editor (you probably won't recognize anything in the file with it) to
  305. change any byte (or more), and then run the file. If the change is in the
  306.  
  307.  
  308.  
  309.  
  310. loader, the program will simply crash; however, if the change is in the
  311. program's image, the program will terminate and you will get a CRC error
  312. message. Remember that error message, because whenever a change is
  313. detected, the program will halt with that message. If you are a programmer,
  314. you should make a note in your documentation to contact you if your user
  315. encounters that message along with where the user obtained the file.
  316.  
  317.  
  318.  
  319.  
  320. Notes about EXE protecting:
  321.  
  322.  
  323.  
  324.      This EXE file loader will give any hacker a great deal of trouble
  325. trying to defeat: all data areas are encrypted, a more reliable CRC method
  326. is used, self-modifying code (what every hacker just loves to see) is
  327. sprinkled liberally in the file, all data areas and decryption units are
  328. cleared after being used, and a rather long encrypting sequence is used.
  329. Please read the COM file notes above before reading this, and also try
  330. testing Protect! EXE/COM's protecting ability by modifying protected files.
  331. Since EXE files can have a rather unlimited size limit (for MS-DOS running
  332. under 640k conventional memory in real mode WITHOUT OVERLAYS, there is
  333. somewhat of a practical size limit about 400-500k), they can tend to take
  334. up many 64k segments, requiring them to be loaded using slower methods. It
  335. is for chiefly this reason why loading EXE files with Protect! EXE/COM may
  336. be a bit slower than loading COM files of the same size. Both decrypting
  337. and CRC calculating are done in one pass with a minimum of PUSHing and
  338. POPing to speed things up, and little noticeable slowing may occur. You
  339. must use a compressor such as LZEXE or PKLite before protecting an EXE file
  340. in order to insure that the relocation pointers are dealt with. PKLite
  341. still leaves one relocation pointer in the table, so a special temporary
  342. file must be created which makes the actual protecting of a PKLited file
  343. much slower. The EXE protector adds around 300 bytes to a file, depending
  344. on the actual file size, and about 50 bytes in addition to that if the file
  345. was PKLited instead of LZEXEd. That much space is negligible, especially
  346. with the advent of multi-gigabyte harddrives. In addition to any overhead
  347. that LZEXE or PKLite adds to a file, Protect! EXE/COM will increase the
  348. initial load time by approximately 50%. Remember, THAT DOES NOT NECESSARILY
  349. MAKE IT TAKE 50% LONGER FOR THE PROGRAM TO START because a good portion of
  350. the delay for a program's loading is the program's own initialization of
  351. variables instead of just MS-DOS's physical loading, and that period of
  352. time will stay constant. In and all, you really should ONLY EXPECT A 20-
  353. 30% DELAY IN TOTAL PROGRAM STARTING TIME, and that extra half-second or so
  354. of delay will not really bother anybody. You are only allowed to run
  355. Protect! EXE/COM on an EXE file once because the time delay for a file that
  356. has had Protect! EXE/COM run on it several times can start to get way too
  357. long. Again, anybody who will kill himself over a 20% increase in load time
  358. (which will usually be about a half a second at the beginning of a program)
  359. will have the most powerful 486 on the market on his desk. But in any case,
  360. that 20% or so increase of load time will not be noticed AT ALL by most
  361. users on most files.
  362.  
  363.  
  364.  
  365. Finally, Protect! EXE/COM's Cost:
  366.  
  367.      After seeing how Protect! EXE/COM can save you time, effort, energy,
  368.  
  369.  
  370.  
  371.  
  372. and money, it is now time to discuss price. There are NO "run-time fees,"
  373. "royalties," or anything of the type attached to the cost of Protect!
  374. EXE/COM; you can protect and distribute as many files as you want with
  375. Protect! EXE/COM once you register. The cost is $25 per copy of Protect!
  376. EXE/COM which may be used on one machine. There is almost no difference
  377. between the registered and unregistered versions of Protect! EXE/COM except
  378. for the "beg screen" and the "Registered to:" message on the main screen. I
  379. was going to have the unregistered version of Protect! EXE/COM imbed a
  380. copyright message or something like "Made With an UNREGISTERED Copy of
  381. Protect! EXE/COM" into the output file, but I decided against it because
  382. most people could get out their favorite hex editor and replace it with
  383. their own message. Because of that, you are even more on your honor to
  384. register Protect! EXE/COM. It is not crippled at all, and I really do not
  385. like finding programs protected with the unregistered version of my program
  386. being distributed. Registered users get support via mail, Compuserve, 
  387. limited BBS support, the ability to distribute protected files, and more!
  388.      There is a definite threat of hackers and viruses on the loose and it
  389. is your responsibility to protect your programs. While some compression
  390. utilities such as LZEXE and PKLite that are already on the market
  391. marginally have the ability to protect your programs, only Protect! EXE/COM
  392. has the solid ability to provide much more protection for only $25.
  393.  
  394.      Thank you for evaluating Protect! EXE/COM and actually reading this
  395. much of the documentation -- Happy EXE/COM Protecting!
  396.  
  397.      Send any Inquiries and Registrations to:
  398.                               Jeremy Lilley
  399.                               27816 Radfall Court
  400.                               Santa Clarita, CA 91350
  401.                               Compuserve: 75060,2074
  402.